package com.luyu.req;

import com.luyu.customvalid.UserGroupSequenceProvider;
import com.luyu.group.SequenceGroupOne;
import com.luyu.group.SequenceGroupTwo;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.hibernate.validator.group.GroupSequenceProvider;

/**
 * @Author lyh
 */
@Data
@GroupSequenceProvider(UserGroupSequenceProvider.class)
public class UserGroupSequenceProviderReq {

    @NotEmpty(message = "名称",groups = {SequenceGroupOne.class})
    private String name;

    @Max(value = 3,message = "年龄不可超过{value}岁",groups = {SequenceGroupTwo.class})
    private Integer age;
}
